	.file	"Utils.c"
	.text
.globl agrandar_memoria
	.type	agrandar_memoria, @function
agrandar_memoria:
	pushl	%ebp
	movl	%esp, %ebp
	subl	$40, %esp
	movl	12(%ebp), %edx
	movl	8(%ebp), %eax
	movl	(%eax), %eax
	movl	%edx, 4(%esp)
	movl	%eax, (%esp)
	call	realloc
	movl	%eax, -12(%ebp)
	cmpl	$0, -12(%ebp)
	jne	.L2
	movl	8(%ebp), %eax
	movl	(%eax), %eax
	movl	%eax, (%esp)
	call	free
	movl	$-2, %eax
	jmp	.L3
.L2:
	movl	8(%ebp), %eax
	movl	-12(%ebp), %edx
	movl	%edx, (%eax)
	movl	$0, %eax
.L3:
	leave
	ret
	.size	agrandar_memoria, .-agrandar_memoria
.globl leerlinea
	.type	leerlinea, @function
leerlinea:
	pushl	%ebp
	movl	%esp, %ebp
	subl	$40, %esp
	movl	$0, -12(%ebp)
	movl	$-1, -16(%ebp)
	movl	12(%ebp), %eax
	movl	$0, (%eax)
.L10:
	addl	$1, -16(%ebp)
	movl	-16(%ebp), %eax
	cmpl	-12(%ebp), %eax
	jne	.L6
	addl	$100, -12(%ebp)
	movl	-12(%ebp), %eax
	addl	$2, %eax
	movl	%eax, 4(%esp)
	movl	12(%ebp), %eax
	movl	%eax, (%esp)
	call	agrandar_memoria
	testl	%eax, %eax
	je	.L6
	movl	$-2, %eax
	jmp	.L7
.L6:
	movl	8(%ebp), %eax
	movl	%eax, (%esp)
	call	fgetc
	movl	%eax, -20(%ebp)
	cmpl	$-1, -20(%ebp)
	je	.L14
.L8:
	movl	12(%ebp), %eax
	movl	(%eax), %edx
	movl	-16(%ebp), %eax
	addl	%eax, %edx
	movl	-20(%ebp), %eax
	movb	%al, (%edx)
	movl	12(%ebp), %eax
	movl	(%eax), %edx
	movl	-16(%ebp), %eax
	leal	(%edx,%eax), %eax
	movzbl	(%eax), %eax
	cmpb	$10, %al
	jne	.L10
	jmp	.L9
.L14:
	nop
.L9:
	cmpl	$0, -16(%ebp)
	jne	.L11
	cmpl	$-1, -20(%ebp)
	jne	.L11
	movl	12(%ebp), %eax
	movl	(%eax), %eax
	movl	%eax, (%esp)
	call	free
	movl	$-1, %eax
	jmp	.L7
.L11:
	movl	12(%ebp), %eax
	movl	(%eax), %edx
	addl	$1, -16(%ebp)
	movl	-16(%ebp), %eax
	leal	(%edx,%eax), %eax
	movb	$0, (%eax)
	movl	-16(%ebp), %eax
	addl	$1, %eax
	movl	%eax, 4(%esp)
	movl	12(%ebp), %eax
	movl	%eax, (%esp)
	call	agrandar_memoria
	testl	%eax, %eax
	je	.L12
	movl	$-2, %eax
	jmp	.L7
.L12:
	movl	$0, %eax
.L7:
	leave
	ret
	.size	leerlinea, .-leerlinea
	.ident	"GCC: (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5"
	.section	.note.GNU-stack,"",@progbits
